﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XMLGener.Data
{
    /// <summary>
    /// Type definition of XMLGenerNode class collection.
    /// </summary>
    public class XDataTypeCollection:List<XMLGenerNode>
    {
        /// <summary>
        /// Return XMLGenerNode from this collection, which name is "name"
        /// </summary>
        /// <param name="name">name of node</param>
        /// <returns>null if item was not found</returns>
        public XMLGenerNode getItem(string name)
        {
            foreach (XMLGenerNode node in this)
            {
                if (node.name == name)
                    return node;
            }
            return null;
        }
    }
}
